<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="swoole.resources.html">« 资源类型</a></li>
      <li style="float: right;"><a href="ref.swoole-funcs.html">Swoole 函数 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.swoole.html">Swoole</a></li>
    <li>预定义常量</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="swoole.constants" class="appendix">
 <h1>预定义常量</h1>

 <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
 <p class="para">
  <dl>
   
    <dt id="constant.swoole-base">
     <strong><code>SWOOLE_BASE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-thread">
     <strong><code>SWOOLE_THREAD</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-process">
     <strong><code>SWOOLE_PROCESS</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-ipc-unsock">
     <strong><code>SWOOLE_IPC_UNSOCK</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-ipc-msgqueue">
     <strong><code>SWOOLE_IPC_MSGQUEUE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-ipc-preemptive">
     <strong><code>SWOOLE_IPC_PREEMPTIVE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-tcp">
     <strong><code>SWOOLE_SOCK_TCP</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-tcp6">
     <strong><code>SWOOLE_SOCK_TCP6</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-udp">
     <strong><code>SWOOLE_SOCK_UDP</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-udp6">
     <strong><code>SWOOLE_SOCK_UDP6</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-unix-dgram">
     <strong><code>SWOOLE_SOCK_UNIX_DGRAM</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-unix-stream">
     <strong><code>SWOOLE_SOCK_UNIX_STREAM</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-tcp">
     <strong><code>SWOOLE_TCP</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-tcp6">
     <strong><code>SWOOLE_TCP6</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-udp">
     <strong><code>SWOOLE_UDP</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-udp6">
     <strong><code>SWOOLE_UDP6</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-unix-dgram">
     <strong><code>SWOOLE_UNIX_DGRAM</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-unix-stream">
     <strong><code>SWOOLE_UNIX_STREAM</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-sync">
     <strong><code>SWOOLE_SOCK_SYNC</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sock-async">
     <strong><code>SWOOLE_SOCK_ASYNC</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sync">
     <strong><code>SWOOLE_SYNC</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-async">
     <strong><code>SWOOLE_ASYNC</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-keep">
     <strong><code>SWOOLE_KEEP</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-event-read">
     <strong><code>SWOOLE_EVENT_READ</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-event-write">
     <strong><code>SWOOLE_EVENT_WRITE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-version">
     <strong><code>SWOOLE_VERSION</code></strong>
     (<span class="type">string</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-aio-base">
     <strong><code>SWOOLE_AIO_BASE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-aio-linux">
     <strong><code>SWOOLE_AIO_LINUX</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-filelock">
     <strong><code>SWOOLE_FILELOCK</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-mutex">
     <strong><code>SWOOLE_MUTEX</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-sem">
     <strong><code>SWOOLE_SEM</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-rwlock">
     <strong><code>SWOOLE_RWLOCK</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-opcode-text">
     <strong><code>WEBSOCKET_OPCODE_TEXT</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-opcode-binary">
     <strong><code>WEBSOCKET_OPCODE_BINARY</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-opcode-ping">
     <strong><code>WEBSOCKET_OPCODE_PING</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-status-connection">
     <strong><code>WEBSOCKET_STATUS_CONNECTION</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-status-handshake">
     <strong><code>WEBSOCKET_STATUS_HANDSHAKE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-status-frame">
     <strong><code>WEBSOCKET_STATUS_FRAME</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.websocket-status-active">
     <strong><code>WEBSOCKET_STATUS_ACTIVE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-fast-pack">
     <strong><code>SWOOLE_FAST_PACK</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-debug">
     <strong><code>SWOOLE_LOG_DEBUG</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Debug log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-trace">
     <strong><code>SWOOLE_LOG_TRACE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Trace log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-info">
     <strong><code>SWOOLE_LOG_INFO</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Info log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-notice">
     <strong><code>SWOOLE_LOG_NOTICE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Notice log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-warning">
     <strong><code>SWOOLE_LOG_WARNING</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Warning log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-error">
     <strong><code>SWOOLE_LOG_ERROR</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Error log.
      Available as of swoole 2.1.2.
     </span>
    </dd>

   
   
    <dt id="constant.swoole-log-none">
     <strong><code>SWOOLE_LOG_NONE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      None log.
      Available as of swoole 4.3.2.
     </span>
    </dd>

   
  </dl>

 </p>
</div>
</div></div></body></html>